import request from '@/utils/request'

// export function getList(params) {
//   return request({
//     url: '/table/list',
//     method: 'get',
//     params
//   })
// }
export default{
  //得到医院设置按条件的分页信息
  getHospSetList(current,limit,searchObj){
    return request({
      url: `/admin/hosp/hospitalSet/findPage/${current}/${limit}`,
      method: 'post',
      data: searchObj //使用json形式传递 
    })
  },
  //删除医院设置信息
  deleteHospSet(id){
    return request({
      url: `/admin/hosp/hospitalSet/${id}`,
      method: 'delete'
    })
  },
  //批量删除医院设置信息
  batchDelHospSet(ids){
    return request({
      url: `/admin/hosp/hospitalSet/batchRemove`,
      method: 'delete',
      data: ids
    })
  },
  //医院设置的锁定与取消锁定
  lockAndUnLockHospSet(id,status){
    return request({
      url: `/admin/hosp/hospitalSet/lockHospitalSet/${id}/${status}`,
      method: 'put'
    })
  },
  //医院信息的添加操作
  addHospSet(hospSet){
    return request({
      url: `/admin/hosp/hospitalSet/saveHospitalSet`,
      method: 'post',
      data: hospSet
    })
  },
  //通过医院id查询医院设置信息
  getHospSetById(id){
    return request({
      url: `/admin/hosp/hospitalSet/getHospitalSet/${id}`,
      method: 'get',
    })
  },
  //更新医院信息操作
  updateHospSet(hospSet){
    return request({
      url: `/admin/hosp/hospitalSet/updateHospitalSet`,
      method: 'put',
      data: hospSet
    })
  }
}
